package com.maltys.service.impl;

import com.maltys.dao.EmployeeMapper;
import com.maltys.entity.Employee;
import com.maltys.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author malty
 */
@Service
public class EmployeeServiceImpl implements IEmployeeService {
    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public List<Employee> listAll() {
        return employeeMapper.listAll();
    }

    @Override
    public Employee getById(Integer id) {
        return employeeMapper.getById(id);
    }

    @Override
    public Employee getByName(String name) {
        return employeeMapper.getByName(name);
    }
}
